﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PlaceOrder_Client.Helper
{
    public class SoundPlayerHelper
    {
        // 播放音频通知的方法
        public static void PlayNotificationSound()
        {
            string audioFilePath = "Resources/Sound/msg.wav"; // 替换为你的音频文件路径

            try
            {
                var player = new System.Media.SoundPlayer(audioFilePath);
                player.Play();
            }
            catch (Exception ex)
            {
                // 处理播放音频失败的异常
                Console.WriteLine("播放音频失败: " + ex.Message);
            }
        }
    }
}
